package com.Test.control;

import com.Test.domain.Person;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/person")
public class PersonControl {

    @PostMapping("/validate")
    public String validate(@RequestBody @Valid Person person){
        return "person";
    }

    @PostMapping("/general")
    public Object general(@RequestBody Person person){
        return "general";
    }

}
